
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:xin_nuo_pda/qc/QcTrackInController.dart';
import 'package:xin_nuo_pda/values/constant.dart';
import 'package:xin_nuo_pda/views/SubTitleBar.dart';
import 'package:xin_nuo_pda/views/TextView.dart';
import 'package:xin_nuo_pda/views/edittext/TitleEditText.dart';

class QcTrackInPage extends StatelessWidget{
  final controller = Get.put(QcTrackInController());
  final state = Get.find<QcTrackInController>().state;
  TextEditingController textController = TextEditingController();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(USER),
      ),
      body: Column(
        children: [
          SubTitleBar("开始作业", "提交", (){
            controller.trackIn();
          }),
          TitleEditText(
            "批次ID:",
            "请扫描批次ID",
                (value) {
                controller.lotID = value;
                controller.lotInfo();
            },
            controller: textController,
          ),
          GetBuilder<QcTrackInController>(
              builder:(controller) => Container(
                child:    Column(
                  children:[
                    TextView("批次数量:", controller.lotEntity?.mAINQTY.toString() ?? '0')
                  ] 
                ),
                
              ),
            id: controller.lotInfoId,
          )
        ],
      ),
    );
  }

}